﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IA2MazeSolver
{
    public class Individuo : IComparable<Individuo>
    {
        public byte[] Data;
        public int Fitness;

        public Individuo() { }

        public Individuo(byte[] data)
        {
            this.Data = data;
            this.Fitness = 0;
        }

        public Individuo(byte[] data, int fitness)
        {
            this.Data = data;
            this.Fitness = fitness;
        }

        public int CompareTo(Individuo other)
        {
            if (this.Fitness < other.Fitness)
            {
                return -1;
            }
            else if (this.Fitness > other.Fitness)
            {
                return 1;
            }
            else
            {
                return 0;
            }

        }
    }
}
